class Solution {
public:
    bool halvesAreAlike(string s) {
        vector<char> ans = {'a','e','i','o','u','A','E','I','O','U'};
        int cnt = 0;
        int m = s.size() / 2;
        for(int i = 0,j = m;i < m && j < s.size();i++,j++){
            if(find(ans.begin(),ans.end(),s[i]) != ans.end()){
                cnt++;
            }
            if(find(ans.begin(),ans.end(),s[j]) != ans.end()){
                cnt--;
            }
        }
        if(cnt == 0) return true;
        return false;
    }
};
